package design.observer;

public class ObserverPatternTest {
    public static void main(String[] args) {
        MobileApp appA = new MobileApp("AppA");
        MobileApp appB = new MobileApp("AppB");
        MobileApp appC = new MobileApp("AppC");
        WeatherStation weatherStation = new WeatherStation();
        weatherStation.addObserver(appA);
        weatherStation.addObserver(appB);
        weatherStation.addObserver(appC);
        weatherStation.setWeather("Sunny");
        weatherStation.removeObserver(appB);
        weatherStation.setWeather("Windy");
    }
}
